package sword.T50;

/**
 * @Author: 18362
 * @Create: 2022-04-09 22:23:08 星期六
 */
class Solution {
    public char firstUniqChar(String s) {
        int[] ht = new int[26];
        for (int i=0; i<s.length(); ++i) {
            ht[s.charAt(i)-'a']++;
        }
        for (int i=0; i<s.length(); ++i) {
            if (ht[s.charAt(i)-'a'] == 1)
                return s.charAt(i);
        }
        return ' ';
    }
}
